package com.java.d1.demo01;

public class ArrayLength {
    public static void main(String[] args) {
        int[] array ={1,2,3,4,6,7,8,9};
        System.out.println(array.length);//8

        /*
        * 数组一旦创建，程序运行期间，长度不可改变。
        *
        * */
        int[] arrayA={1,2,3,4};
        System.out.println(arrayA.length);//4
        arrayA = new int[3];
        System.out.println(arrayA.length);//3
    }
}
